package DEC;

import Components.EthernetSwitch;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author mgrutman
 */
public class DEC
{
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        MyExecuter mye = new MyExecuter ();
        boolean run = true; 
        
        while (run)
        { 
            switch (menu())
            {       
                case 1:
                    mye.myRun("DefaultConfiguration");
                    break;
                case 2: 
                    mye.myRun("InteractiveConfiguration");
                    break;
                case 3:
                    mye.myRun("Testing");
                    break;
                case 0: 
                    run = false; 
                    break;
                   
            }
        }
    }
    
    public static int menu()
    {
        int choice = -1;
        
        System.out.println("\t---------- Menu -----------");
        System.out.println(" 1. DefaultConfiguration.");
        System.out.println(" 2. Interactive configuration");
        System.out.println(" 3. Display all");
        System.out.println(" 0. Exit");
       
        String str = readInput();
        choice = Integer.parseInt(str);
        return choice; 
    }
    
    public static String readInput ()
    {
        InputStreamReader misr = new InputStreamReader(System.in);
        BufferedReader in = new BufferedReader (misr);
        try
        {
            return (in.readLine());
        } catch (IOException ex)
        {
            Logger.getLogger(DEC.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        return "";
    }
}
